package com.example.jdkDynamic;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

/**
 * TODO: 这里要写注释的!
 */
public class MyInvocationHandler implements InvocationHandler {
    private Object target;
    public MyInvocationHandler(){
        super();
    }
    public MyInvocationHandler(Object target){
        super();
        this.target= target;
    }
    @Override public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        Object result= method.invoke(target,args);
        return result;
    }
}
